const odooModelName = 'res.partner'

const fields_default = {
  child_ids: {
    name: null,
    email: null,
    title: null,
    category_id: null,
    parent_id: null
  }
}

const detail_columns = ['name', 'email', 'category_id__names']

const child_configs = {
  child_ids: {
    label: '联系人',
    columns: ['parent_id', 'title__name', 'name', 'email'],
    formItems: ['name', 'email', 'title'],
    handle: {
      create: {
        text: '添加联系人'
      }
    }
  }
}

const formItems = ['name', 'email', 'category_id']

const Model = {
  name: odooModelName,

  configs: {
    fields_default,
    detail_columns,
    child_configs,
    formItems
  }
}

export default Model
